Release notes for WebAPI 3.2.0.1357
Release notes
Official release version 3.2.0.1357 includes the following bug fixes and new functionality:
Bug fixes
- Empty multilingual context fields generated an error message. Fixed in 3.1.1.1322.
- Linked data (e.g. the name of creator in an object record) retrieved by the WebAPI was not updated after the name had been changed in Axiell Collections. This was the case for at least 15 minutes or until the application pool for the WebAPI was recycled. This was and is caused by the default (readonly) caching of earlier retrieved records and their linked data by the WebAPI if the
writeAllowed
setting for the database had been set to false, which increases performance for records containing a lot of links. Normally this not a problem since the application pool for a WebAPI is usually recycled each night, but it can also result in the retrieval of outdated data in the described case. The fix in version 3.1.1.1280 consists of new optional settings in adlibweb.xml: please see the Setting the caching mode of the WebAP new functionality topic below. - The data of a merged-in, inherited enumerative field was not retrieved by the WebAPI. Fixed in 3.1.1.1279.
- A WebAPI image handler returned a The given path's format is not supported. error for requested image files with a relative path in front of the file name (with backslashes) combined with
width
andheight
parameters. Fixed in version 3.1.1.1253.
New functionality
Conditionally excluding specific records from an OAI harvest result
Sometimes you'd like to exclude specific records from an OAI harvest result, based on a value in some field in those records. You could have some custom checkbox to indicate so, for example. To this end, a new OAI configuration element has been introduced in WebAPI 3.1.1.1286: <HiddenRecordsFilter>
. Provide an advanced search query in such a node underneath the desired <OAI_SET>
configuration. For example: <HiddenRecordsFilter>exclude_from_web = 'x'</HiddenRecordsFilter>
. This assumes you have a checkbox field named exclude_from_web but you can use any field and any value. When marked, it'll contain the value 'x', so this condition then excludes that record from an OAI harvest. The harvest result XML will still list the record identifier and the date stamp, but their header node will get the status="deleted"
attribute (even though the record hasn't really been deleted) to effectively hide/exclude the record from the result. A partial XML result where a record 2 is excluded this way, could look as follows for example:
<?xml version="1.0" encoding="utf-8"?> <OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"> <responseDate>2022-03-24T07:09:18Z</responseDate> <request verb="ListRecords" set="collect" metadataPrefix="adlib">http://localhost:12345/oai.ashx</request> <ListRecords> <record> <header status="deleted"> <identifier>collecthighlight:2</identifier> <datestamp>2022-03-24T07:09:18Z</datestamp> </header> </record> <record> <header> <identifier>collecthighlight:3</identifier> <datestamp>2022-02-08T14:44:38Z</datestamp> <setSpec>collect</setSpec> </header> <metadata> <record priref="3" created="2020-07-06T09:20:57Z" modification="2022-02-08T14:44:38Z" selected="false" deleted="false" xmlns="http://www.openarchives.org/OAI/2.0/"> ...
Setting the caching mode of the WebAPI
By default, if <writeAllowed>False</writeAllowed>
has been set for the current database in adlibweb.xml, the WebAPI caches (in so-called readonly mode) records and their linked data after they've been retrieved, which increases performance for records containing a lot of links. Normally this not a problem since the application pool for a WebAPI is usually recycled each night, but it can also result in the retrieval of outdated data when an Axiell Collections user edits a record before it is retrieved again by the WebAPI quickly after. Therefore, from version 3.1.1.1280 the cache mode can be set explicitly in adlibweb.xml, using the <cacheMode>
element underneath the <globalConfiguration>
node. The following settings are available:
disabled
: no record caching will take place so each time a record is requested it’s retrieved (up-to-date) from the SQL database.readonly
(default): the first time a record is requested it’s retrieved from the SQL database and put in the record cache so that subsequent requests will use the cached version (even if the record was changed in the SQL database after being cached).readwrite
: the first time a record is requested it’s retrieved from the SQL database and put in the record cache, but subsequent requests will check if the record was updated in the SQL database and update the cached version accordingly.
Setting <writeAllowed>True</writeAllowed>
implicitly sets the cache mode to readwrite mode, even if you explicitly set the cacheMode differently, so that for writing changes always the up-to-date record is used.
Inherited fields now implicitly searched with expand operator by default
WebAPI version 3.1.1.1220 and higher now automatically (and implicitly) perform an expand
search on inherited fields by default. This means that if e.g. the title field is inherited and a title has only actually been stored in a top record in some hierarchy, then searching on (words from) a title using e.g. the = operator will not only find the top record but all records below it which inherit the title as well. This functionality can be switched off though, by including the <defaultExpand>false</defaultExpand>
setting in the globalConfiguration section in adlibweb.xml.